#! /usr/bin/python

UP = 10**6

count = 0
for inside in range(1, UP/4):
    s = 0
    length = inside
    while(True):
	s = s + 4*length + 4
	if s > UP: break
	count += 1
	#print inside, length, s
	length += 2
    #print count

print count
    
